package com.zqh;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: zqh
 * @CreateTime: 2025-10-11
 * @Description: 自动配置类
 * @Version: 1.0
 */

@Configuration
public class WebServerAutoConfiguration implements AutoConfiguration {

    @Bean
    @ConditionalOnClass("org.apache.catalina.startup.Tomcat")
    public WebServer tomcatWebServer(){
        return new TomcatWebServer();
    }

    @Bean
    @ConditionalOnClass("org.eclipse.jetty.server.Server")
    public WebServer jettyWebServer(){
        return new JettyWebServer();
    }

}